Socket
Socket
Sign inDemoInstall

@fluentui/react-compose

Package Overview
Dependencies
Maintainers
14
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react-compose

Fluent UI React component composition.


Version published
Weekly downloads
14K
decreased by-7.48%
Maintainers
14
Weekly downloads
 
Created
Source

@fluentui/react-compose

Composition functionality for Fluent UI

This functionality is in the experimental stage and should never be used in production as APIs might change before final release.

Usage

To import compose and use:

import { Button } from '@fluentui/react-northstar';
import { compose } from '@fluentui/react-compose';

const PrimaryButton = compose(Button, {
  className: 'ui-primary-button',
  displayName: 'PrimaryButton',

  mapPropsToStylesProps: props => ({ compact: props.compact }),

  handledProps: ['compact'],
  overrideStyles: true,
});
  • className overrides a className that we will be assigned to the root slot of a component
  • displayName modifies a React's displayName for component, it will be also used as a selector for styles overrides in your theme
  • mapPropsToStylesProps passes additional design terms to styles functions
  • handledProps is an array of props that will not be bypassed to the component's root slot
  • overrideStyles indicates should the component will use only its own styles or will merge those with parent's

FAQs

Package last updated on 31 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc